package com.guet.game.weapon;

import com.guet.game.airplanes.dao.FlyingObj;
import com.guet.game.utils.Images;

import java.awt.image.BufferedImage;

public class BossBullet extends FlyingObj {

    public int speed;
    public double angle;

    private double xMovement;
    private double yMovement;

    public BossBullet(int x, int y, double angle) {
        super(8, 20, x, y);
        speed = 4;
        xMovement = Math.sin(angle);
        yMovement = Math.cos(angle);
    }

    @Override
    public BufferedImage getImage() {
        //System.out.println(Images.bullet);
        if(state == LIFT) {
            return Images.bullet[3];
        }
        else if(state == DEAD) {
            return null;
        }
        return null;
    }


    @Override
    public void move() {

        x += xMovement * speed;
        y += yMovement * speed;

    }

}
